import AdminLogin from '@/modules/admin/views/login/index.vue'
import AdminLayout from '@/modules/admin/views/layout/index.vue'
import AdminHome from '@/modules/admin/views/home/index.vue'
import AdminMessageBoard from '@/modules/admin/views/messageboard/index.vue'
import AdminUser from '@/modules/admin/views/user/index.vue'

const adminRoutes = [
  {
    path: '/admin',
    component: AdminLayout,
    redirect: '/admin/home',
    children: [
      {
        path: '/admin/home',
        name: 'adminHome',
        component: AdminHome,
        meta: { login: true },
      },
      {
        path: '/admin/messageboard',
        name: 'adminMessageBoard',
        component: AdminMessageBoard,
        meta: { login: true },
      },
      {
        path: '/admin/user',
        name: 'adminUser',
        component: AdminUser,
        meta: { login: true },
      },
    ],
  },
  {
    path: '/admin/login',
    name: 'adminLogin',
    component: AdminLogin,
  },
]

export default adminRoutes
